package com.example.demo.service;

import com.example.demo.entity.Topic;
import com.example.demo.mapper.TopicMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-10-09
 * Time:10:01
 */
@Service
public class TopicService {
    @Autowired
    private TopicMapper topicMapper;

    //题目列表查询
    public List<Topic> getTopicList(int size,int offset) {
        return topicMapper.getTopicList(size,offset);
    }
    //题目总数查询
    public int getTopicCount() {
        return topicMapper.getTopicCount();
    }
    //查询题目的标准答案和测试集合
    public String getPositive(String title){
        return topicMapper.getPositive(title);
    }
    //查找题目相关信息
    public Topic getTopicInfo(String title) {
        return topicMapper.getTopicInfo(title);
    }
}
